Retrieving Information About a Device

Every device responds to the capability14PJB2D (MCI_GETDEVCAPS8A0P0PJ), status3L25TX (MCI_STATUSCTUPE8), and infoUDBQFA (MCI_INFO1OO.7GB) commands. These commands obtain information about the device. For example, the following command returns  true  if a cdaudio device can eject the disc:

mciSendString(
    "capability cdaudio can eject",
    lpszReturnString, lstrlen(lpszReturnString), NULL);
 

The flags listed for the required and basic commands provide a minimum amount of information about a device. Many devices supplement the required and basic commands with extended flags to provide additional information about the device.